<template>
    <div>
        <div class="market_title">托管设置</div>
        <el-form-item label="成本稳投" prop="lab_ad_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
            <div class="flexbox flexcenter">
                <el-radio-group v-model="createform.lab_ad_type" size="small" @change="managedSet2">
                    <el-radio-button label="LAB_AD">开启</el-radio-button>
                    <el-radio-button label="NOT_LAB_AD">关闭</el-radio-button>
                </el-radio-group>
                <span class="user_tips font_12 color_02" v-if="createform.lab_ad_type=='LAB_AD'">Tips：开启计划托管后，已选择的广告组将会失效</span>
            </div>
        </el-form-item>
    </div>
</template>

<script>
export default {
    props: ["createform","dataForm"],
    name: "",
    data() {
        return {};
    },
    created() {
        
    },
    methods: {
        sessionSave(){
            this.$emit("sessionSave")
        },
        // 成本稳投
        managedSet2(e){
            if(e=='LAB_AD'){
                this.createform.external_action = 'AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY'
                this.createform.delivery.smart_bid_type = 'SMART_BID_CUSTOM'
                this.createform.delivery.cost_control = false
                this.createform.creative_material_mode = 'PROGRAMMATIC_CREATIVE'
                this.createform.delivery.flow_control_mode = 'FLOW_CONTROL_MODE_FAST'
                this.createform.delivery.budget_mode = 'BUDGET_MODE_DAY'
                this.createform.audience.awemeRadio = 1
                this.createform.audience.smart_interest_action = 'RECOMMEND'
                this.createform.creative_way = ['LIVE']
            }else{
                this.createform.creative_material_mode = 'CUSTOM_CREATIVE'
                this.createform.delivery.budget_mode = 'BUDGET_MODE_TOTAL'
                this.createform.creative_way = 'LIVE'
            }
            this.sessionSave();
        },
    },
    components: {},
};
</script>


<style scoped>
</style>

